package com.pr.makfilm.user.pages.room.create.design;

import com.pr.makfilm.domain.Room;
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.IModel;

/**
 * User: pawel.radomski
 * Date: 23.01.14
 * Time: 18:17
 */
public class DesignColumnHeader extends RepeatingView
{
   public DesignColumnHeader(String id, IModel<Room> model)
   {
      super(id, model);
   }

   @Override
   protected void onPopulate()
   {
      removeAll();
      Room room = (Room) getDefaultModelObject();
      add(new Label(newChildId(), StringUtils.EMPTY));
      for (int i = 0; i<room.getColumnCount(); i++)
      {
         add(new Label(newChildId(), "" + (i + 1)));
      }
   }
}
